package one.stand.controller;

import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.service.OfficialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 官网表单提交信息管理
 * @author zrh
 */
@RestController
@RequestMapping("/official")
public class OfficialController{

    /**
     * 官网表单提交信息管理
     */
    @Autowired
    private OfficialService officialService;

    /**
     * 添加官网申请信息表单
     */
    @PostMapping("/saveOfficialApply")
    public ResultModel saveOfficialApply(@RequestBody OfficialApplyRequest request){
        return officialService.saveOfficialApply(request);
    }

    /**
     * 添加官网联系我们信息表单
     */
    @PostMapping("/saveOfficialContact")
    public ResultModel saveOfficialContact(@RequestBody OfficialContactRequest request){
        return officialService.saveOfficialContact(request);
    }

    /**
     * 添加官网表单信息
     */
    @PostMapping("/saveOfficialFrom")
    public ResultModel saveOfficialFrom(@RequestBody OfficialFromRequest request){
        return officialService.saveOfficialFrom(request);
    }

}
